
// 供应商
import qs from "qs"
import request from "@/utils/request"

/**
 *GET 获取供应商列表
  * @params
 * @return {*}
 */
export function getSupplierList(data) {
  return request({
    url: "/supplier/getList?" + qs.stringify(data),
    method: "get",
  })
}
/**
 *GET 获取供应商所有列表
  * @params
 * @return {*}
 */
export function getSupplierAll() {
  return request({
    url: "/supplier/getAll",
    method: "get",
  })
}


/**
 * 新增供应商
 * @return {*}
 */
export function addSupplier(data) {
  return request({
    url: "/supplier/add",
    method: "post",
    data
  })
}

/**
 * 修改供应商
 * @return {*}
 */
export function updateSupplier(data) {
  return request({
    url: "/supplier/update",
    method: "post",
    data
  })
}

/**
 * 删除供应商
 * @return {*}
 */
export function deleteSupplierById(id) {
  return request({
    url: "/supplier/delete?id=" + id,
    method: "delete",
  })
}
